package edums.common.model.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

public class PostDAOImpl implements PostDAO {
	private SqlMapClientTemplate client;
	
	public PostDAOImpl(SqlMapClientTemplate client){
		this.client = client;
	}
	
	@Override
	public List selectSearchPost(Map searchInfo) throws SQLException{
		return client.queryForList("post.selectSearchPost", searchInfo);
	}
	
	@Override
	public int selectSearchPostTotalContent(Map searchInfo) throws SQLException{
		return (Integer) client.queryForObject("post.selectSearchPostTotalContent", searchInfo);
	}
}
